package com.ly.activiti.config;

import org.activiti.engine.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author LY
 * @create 2023/11/23 14:21
 * @Description activiti配置
 */
@Configuration
public class ActivitiConfig {

    @Bean
    public RepositoryService repositoryService() {
        return ProcessEngines.getDefaultProcessEngine().getRepositoryService();
    }

    @Bean
    public RuntimeService runtimeService() {
        return ProcessEngines.getDefaultProcessEngine().getRuntimeService();
    }

    @Bean
    public TaskService taskService() {
        return ProcessEngines.getDefaultProcessEngine().getTaskService();
    }

    @Bean
    public HistoryService historyService(){
        return ProcessEngines.getDefaultProcessEngine().getHistoryService();
    }
}